/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package JFreeChartExtensions.storable;

import java.awt.Color;
import java.awt.Paint;
import java.io.Serializable;

/**
 *
 * @author Nobody
 */
public class StorableRendererObject implements Serializable {

    private int seriesIndex;
    private int datasetIndex;
    private Boolean seriesVisible;
    private Boolean seriesAsLines;
    private Boolean seriesAsShapes;
    private Boolean xErrorBarsVisible;
    private Boolean yErrorBarsVisible;
    private int rgb;

    public StorableRendererObject(int seriesIndex,int datasetIndex , Boolean seriesVisible, Boolean seriesAsLines, Boolean seriesAsShapes, Boolean xErrorBarsVisible, Boolean yErrorBarsVisible, Color seriesColor) {
        this.seriesIndex = seriesIndex;
        this.datasetIndex = datasetIndex;
        this.seriesVisible = (seriesVisible != null) ? seriesVisible : true;
        this.seriesAsLines = (seriesAsLines != null) ? seriesAsLines : false;
        this.seriesAsShapes = (seriesAsShapes != null) ? seriesAsShapes : true;
        this.xErrorBarsVisible = (xErrorBarsVisible != null) ? xErrorBarsVisible : false;
        this.yErrorBarsVisible = (yErrorBarsVisible != null) ? yErrorBarsVisible : false;
        this.rgb = seriesColor.getRGB();


    }

    public boolean isXErrorBarsVisible() {
        return xErrorBarsVisible;
    }

    public boolean isYErrorBarsVisible() {
        return yErrorBarsVisible;
    }

    public int getDatasetIndex() {
        return datasetIndex;
    }

    public int getSeriesIndex() {
        return seriesIndex;
    }

  

    public boolean isSeriesAsLines() {
        return seriesAsLines;
    }

    public boolean isSeriesAsShapes() {
        return seriesAsShapes;
    }

    public boolean isxErrorBarsVisible() {
        return xErrorBarsVisible;
    }

    public void setxErrorBarsVisible(boolean xErrorBarsVisible) {
        this.xErrorBarsVisible = xErrorBarsVisible;
    }

    public boolean isyErrorBarsVisible() {
        return yErrorBarsVisible;
    }

    public void setyErrorBarsVisible(boolean yErrorBarsVisible) {
        this.yErrorBarsVisible = yErrorBarsVisible;
    }

    public Paint getSeriesColor() {
        return new Color(rgb);
    }

    public boolean isSeriesVisible() {
        return seriesVisible;
    }
}
